/*
 * @Description:
 * @version:
 * @FilePath: \six-groups-of-jieshuibao\src\viwes\ServiceTeam\ServiceTeam.js
 * @Author: Suri
 * @Date: 2022-09-15 15:32:31
 * @LastEditTime: 2022-09-15 16:17:11
 */
import {
  AppstoreOutlined,
  ContainerOutlined,
  DesktopOutlined,
  MailOutlined,
  MenuFoldOutlined,
  MenuUnfoldOutlined,
  PieChartOutlined,
} from "@ant-design/icons";
import { Button, Menu, Layout } from "antd";
import "antd/dist/antd.css";
import React, { useState } from "react";
import { Outlet, Link } from "react-router-dom";
const { Sider, Content, Header } = Layout;
function getItem(label, key, icon, children, type) {
  return {
    key,
    icon,
    children,
    label,
    type,
  };
}

const items = [
  getItem("03服务团队", "sub1", <MailOutlined />, [
    getItem(<Link to="StandardTasks">3.1标准任务</Link>, "1"),
    getItem(<Link to="DataTemplate">3.2资料模板</Link>, "2"),
    getItem("3.3工作流程配置", "3"),
    getItem("3.4新单工作台", "4"),
    getItem("3.5员工出勤设置", "5"),
    getItem("3.6通知服务", "6"),
    getItem("3.7任务管理-公司设立", "7"),
    getItem("3.8任务管理-银行开户", "8"),
    getItem("3.9任务管理-税种核定", "9"),
    getItem("3.10任务管理-代理记账", "10"),
    getItem("3.11一般项目", "11"),
    getItem("3.12会计期间设置", "12"),
    getItem("3.13工具设立进度管理", "13"),
  ]),
  getItem("公司信息", "sub2", <MailOutlined />, [
    getItem(<Link to="companyMessage">园区管理</Link>, "2-1"),
    getItem(<Link to="companyPaper">标准任务</Link>, "2-2"),
    getItem(<Link to="commoney">公司金额</Link>, "2-3"),
  ]),
  getItem("园区管理", "sub3", <MailOutlined />, [
    getItem(<Link to="park">园区管理</Link>, "3-1"),
    getItem(<Link to="bank">园区管理2</Link>, "3-2"),
  ]),
  getItem("用户组织", "sub4", <MailOutlined />, [
    getItem(<Link to="CharacterSet">角色设置</Link>, "4-1"),
    getItem(<Link to="PermissionSet">权限设置</Link>, "4-2"),
    getItem(<Link to="InteriorUser">内内部用户设置</Link>, "4-3"),
  ]),
];

const ServiceTeam = () => {
  const [collapsed, setCollapsed] = useState(false);

  // const toggleCollapsed = () => {
  //   setCollapsed(!collapsed);
  // };

  return (
    <Layout
      style={{
        overflow: "auto",
        height: "100vh",
      }}
    >
      {/* <Button
        type="primary"
        onClick={toggleCollapsed}
        style={{
          marginBottom: 16,
        }}
      >
        {collapsed ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />}
      </Button> */}
      <Sider>
        <Menu
          defaultSelectedKeys={["1"]}
          defaultOpenKeys={["sub1"]}
          mode="inline"
          theme="dark"
          items={items}
        />
      </Sider>
      <Content style={{ margin: "24px 16px 0", overflow: "initial" }}>
        <Outlet />
      </Content>
    </Layout>
  );
};

export default ServiceTeam;
